package com.frame.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.frame.domain.Permission;
import com.frame.domain.RolePermission;
import com.mini.core.dao.MiniDao;

/**
 * DAO for {@link RolePermission}.
 */
@Service
public class RolePermissionService{
	@Autowired
	MiniDao miniDao;
	
	/**
	 * 根据roleid查找所有权限
	 * @return
	 */
	public List<RolePermission> findByRoleId(String roleid){
		String sql = "SELECT * FROM ROLE_PERMISSION WHERE ROLEID=?";
		return miniDao.findList(sql, RolePermission.class,roleid);
	}
}
